import Vue from "vue";
import VueRouter from "vue-router";
import index from "../layout/index.vue"
import homeVue from "@/views/index/home.vue";
import costomVue from "../views/index/costom.vue";
import test from "../views/test.vue"
//  webpacl 会自动识别@符号    识别当当前目录结构中 src
// homeVue
Vue.use(VueRouter);

const routes = [
  {
    path: "/", component: index, children: [
      { path: "", component: homeVue },
      { path: "/custom/:id/:index", name: "custom", component: costomVue },
      { path: "/test", name: "test", component: test },
    ]
  }

];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
